/**
 * Copyright 2004 - 2007 Blue Bamboo International Inc. 
 *           All rights reserved.
 *
 *
 * Blue Bamboo PROPRIETARY/CONFIDENTIAL.
 *
 */

package com.bluebamboo.bluetools.pingpang.test;

import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;

import com.bluebamboo.bluetools.pingpang.ConnectionManager;
import com.bluebamboo.bluetools.pingpang.ui.PingPangWindow;

public class PingPangRunner implements IApplication {

	public Object start(IApplicationContext context) throws Exception {
		PingPangWindow viewer = new PingPangWindow(null);
		viewer.setBlockOnOpen(true);
		viewer.open();

		return EXIT_OK;
	}

	public void stop() {
		ConnectionManager connMgr = ConnectionManager.getInstance();
		try {
			connMgr.closeAll();
		}
		catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
